<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="CuotasDetalleListForm">

        <p:panel header="#{bundle.ListCuotasDetalleTitle}">

            <p:dataTable id="datalist" value="#{cuotasDetalleController.items}" var="item"
                         selectionMode="single" selection="#{cuotasDetalleController.selected}"
                         rowKey="#{item.cuotasDetallePK}"
                         paginator="true"
                         rows="10"
                         rowsPerPageTemplate="10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.cuotasDetallePK.nroCuota}" filterBy="#{item.cuotasDetallePK.nroCuota}">
                    <f:facet name="header">
                        <h:outputText value="#{bundle.ListCuotasDetalleTitle_cuotasDetallePK_nroCuota}"/>
                    </f:facet>
                    <h:outputText value="#{item.cuotasDetallePK.nroCuota}"/>
                </p:column>
                <p:column sortBy="#{item.fecha}" filterBy="#{item.fecha}">
                    <f:facet name="header">
                        <h:outputText value="#{bundle.ListCuotasDetalleTitle_fecha}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecha}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.nroRecibo}" filterBy="#{item.nroRecibo}">
                    <f:facet name="header">
                        <h:outputText value="#{bundle.ListCuotasDetalleTitle_nroRecibo}"/>
                    </f:facet>
                    <h:outputText value="#{item.nroRecibo}"/>
                </p:column>
                <p:column sortBy="#{item.monto}" filterBy="#{item.monto}">
                    <f:facet name="header">
                        <h:outputText value="#{bundle.ListCuotasDetalleTitle_monto}"/>
                    </f:facet>
                    <h:outputText value="#{item.monto}"/>
                </p:column>
                <p:column sortBy="#{item.cuotasCabecera.cuotasCabeceraPK}" filterBy="#{item.cuotasCabecera.cuotasCabeceraPK}">
                    <f:facet name="header">
                        <h:outputText value="#{bundle.ListCuotasDetalleTitle_cuotasCabecera}"/>
                    </f:facet>
                    <h:outputText value="#{item.cuotasCabecera.cuotasCabeceraPK}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{bundle.Create}" actionListener="#{cuotasDetalleController.prepareCreate}" update=":CuotasDetalleCreateForm" oncomplete="CuotasDetalleCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{bundle.View}" update=":CuotasDetalleViewForm" oncomplete="CuotasDetalleViewDialog.show()" disabled="#{empty cuotasDetalleController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{bundle.Edit}" update=":CuotasDetalleEditForm" oncomplete="CuotasDetalleEditDialog.show()" disabled="#{empty cuotasDetalleController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{bundle.Delete}" actionListener="#{cuotasDetalleController.delete}" update=":growl,datalist" disabled="#{empty cuotasDetalleController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>